import {getCopy} from "@/api/setup";

const version = {
    state:() =>({
        versionInfo:{}
    }),
    mutations:{
        setVersionInfo(state,data){
            state.versionInfo = data;
        }
    },
    actions:{
        async getVersionInfo({commit}){
            const {data} = await getCopy();
            data && commit('setVersionInfo', data);
        }
    },
    getters:{
        getLogo(state) {
            return state.versionInfo.icon;
        }
    },


}

export default version;